From: Matthew Daley Date: Sun, 1 Dec 2013 10:14:59 +0000 (+1300) Subject: libxl: remove unsigned less-than-0 comparison X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~5830 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=ce021b0df555c32f4c18ec2534f8f5b8c88e9066;p=xen.git libxl: remove unsigned less-than-0 comparison ...from libxl_cpuid_parse_config_xend. value is unsigned so this doesn't work, and either way the following comparison on it being bigger than 3 does what was intended here anyway. Coverity-ID: 1055614 Signed-off-by: Matthew Daley Acked-by: Ian Jackson --- diff --git a/tools/libxl/libxl_cpuid.c b/tools/libxl/libxl_cpuid.c index e1c406c540..dd21b78864 100644 --- a/tools/libxl/libxl_cpuid.c +++ b/tools/libxl/libxl_cpuid.c @@ -298,7 +298,7 @@ int libxl_cpuid_parse_config_xend(libxl_cpuid_policy_list *cpuid, } value = str[1] - 'a'; endptr = strchr(str, '='); - if (value < 0 || value > 3 || endptr == NULL) { + if (value > 3 || endptr == NULL) { return 4; } str = endptr + 1;